package com.itheima.d4_printstream;

import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.io.PrintWriter;

public class PrintTest1 {
    public static void main(String[] args) {
        try (
                //PrintStream ps = new PrintStream("Day18-io-app\\src\\itheimaOut05.txt");
                PrintWriter ps = new PrintWriter("Day18-io-app\\src\\itheimaOut05.txt");
        ){
            ps.println("Hello,World!");
            ps.println("Hello,World!");
            ps.println("Hello,World!");

            ps.write(97);// 写入数字97对应的ASCII字符


        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
